home *** CD-ROM | disk | FTP | other *** search
/ Quick PC 62 / Quick PC 62.iso / I386 / IPP_0002.AS_ / ipp_0002.asp
Encoding:
Text File  |  2003-06-19  |  1.9 KB  |  74 lines

  1. <%@ CODEPAGE=1252 %> 
  2. <%
  3. ' Replace the above line with your localized code page number
  4. '------------------------------------------------------------
  5. '
  6. '   Microsoft Internet Printing Project
  7. '
  8. '   Copyright (c) Microsoft Corporation 1998
  9. '
  10. '
  11. '------------------------------------------------------------
  12.     option explicit
  13. %>
  14. <!-- #include file = "ipp_util.inc" -->
  15. <%
  16.     CheckSession
  17.     Response.Expires = 0
  18.  
  19.     Dim strPrinter, strLocal, strJobEta
  20.     Dim objPrinter, objQueue
  21.     Const L_OpenPrinter_Text    = "Open Printer: %1"
  22.  
  23.     strPrinter = request("eprinter")
  24.     If Len(strPrinter) > MAX_ENCODED_PRINTER_NAME_LENGTH Then 
  25.         Call ErrorHandler(L_Invalid_Parameter)
  26.     Else
  27.         strPrinter = OleCvt.DecodeUnicodeName(strPrinter)
  28.     End If
  29.  
  30.     strLocal = session(LOCAL_SERVER)
  31.  
  32.     Set objQueue = GetObject("WinNT://" & session(COMPUTER) & "/" & strPrinter)
  33.  
  34.     Dim strTitle
  35.     Const L_PrinterOn_Text = "%1 on %2"
  36.  
  37.     strTitle = LARGE_FONT_TAG & RepString2(L_PrinterOn_Text, GetFriendlyName (objQueue.PrinterName, session(COMPUTER) ), session(LOCAL_SERVER)) & END_FONT
  38.  
  39.     Set objPrinter = Server.CreateObject(PROGID_HELPER)
  40.     On Error Resume Next
  41.     objPrinter.open "\\" & session(COMPUTER) & "\" & strPrinter
  42.     If Err Then
  43.         Call ErrorHandler ( RepString1(L_OpenPrinter_Text, strPrinter) )
  44.     End If
  45.  
  46.     strJobEta = JobEtaInfo (objPrinter)
  47.  
  48.     objPrinter.Close
  49.  
  50. %>
  51. <html>
  52.  
  53. <head>
  54. <%=SetCodePage%>
  55. <meta http-equiv="refresh" content="60">
  56. </head>
  57.  
  58. <body bgcolor="#FFFFFF" text="#000000" link="#000000" vlink="#808080" alink="#000000"
  59. topmargin="0" leftmargin="0">
  60.  
  61.  
  62.  
  63. <table width="100%" border=0 cellspacing="0" cellpadding="2">
  64.     <tr>
  65.         <td nowrap><% =Write (strTitle) %>
  66.             <br><hr width=100% size=1 noshade color=red>
  67.             <% =Write(strJobEta) %>
  68.         </td>
  69.     </tr>
  70. </table>
  71.  
  72. </body>
  73. </html>
  74.